#pragma once
#include <audiere.h>
#include "../Model/AudioBook.h"

using namespace audiere;
class AudioModule {
private:
	AudioDevicePtr device;
	OutputStreamPtr sound;
	AudioBook book;
	int currentFileIndex;
	void openCurrentFile();
public:
	AudioModule(AudioBook & b);
	AudioModule();
	void play();
	void stop();
	void setPosition(int pos);
	int getPosition();
	void setFileIndex(int i);
	int getFileIndex();
	void nextFile();
	bool isPlaying();
	std::string debugOutput();
	void adjust(double c);
	std::string getCurrentFileName();
};
